Original: http://www.cnblogs.com/GavinDai/archive/2011/10/24/2222735.htmlWe are in the program design, always use the definition of variables and the declaration of variables, but sometimes we are not very clear about the concept, know how it is
1, can local variables and global variable duplicate?
A: Yes, the local will screen the overall situation. To use a global variable, you need to use the "::"
Local variables can have the same name as global variables, and when referenced within a
The shell supports custom variables.Defining variablesWhen defining a variable, the variable name does not have a dollar sign ($), such as:
VariableName="value"
Note that there can be no spaces between the variable name and the equals
Tag: color is medium tar local str local SSI GlobalDescription: Now on the market defined variables of the tutorial and books are basically stored procedures are described, but the stored procedure variables can only be used in begin...end block,
In fact, the variables have been used many times in the previous example. The amount of value that can be changed while the program is running is called a variable. A variable should have a name and occupy a certain storage unit in memory, where the
JAVA variable type, definition variable, java variable Type Definition
Common Data Types in JAVA
Data Type
Data Type description
Description
Char
Character Type
Used to store a single character, such as gender "male",
We are in the program design, always use the definition of variables and variable declarations, but sometimes we are not very clear about the concept, know how it is used, but do not know how to do, the following I simply put their differences are
Differences between variable definition and Declaration
(Reprinted)
In program design, we always use the definition of variables and the declaration of variables. Sometimes we are not very clear about this concept and know how to use it, but I don't
Item 26: variable definitions (variable definition) is postponed whenever possible)
By Scott Meyers
Translator: fatalerror99 (itepub's nirvana)
Release: http://blog.csdn.net/fatalerror99/
If you define a variable with a constructor (constructor) or
1. Defining variables can cause construction and destruction overheadWhenever you define a variable of a type: when the control flow reaches the defined point of the variable, you introduce the overhead of calling the constructor, and when you leave
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.